//
//  SelfSizeTool.m
//  10-CellSelfSize
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "SelfSizeTool.h"


@implementation SelfSizeTool
+ (CGFloat)selfSizeHeightWithString:(NSString *)string width:(CGFloat)width font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : font} context:nil];
    return newRect.size.height;
}


@end
